Skip to content

Conversation

@osamakader
Copy link
Contributor

@osamakader osamakader commented Nov 6, 2025

Fixes #148586

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 6, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 6, 2025

jieyouxu is currently at their maximum review capacity.
They may take a while to respond.

@rustbot
Copy link
Collaborator

rustbot commented Nov 6, 2025

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

Adds missing test coverage for rustdoc's `--test-builder` option.

The existing test only covered the error case (non-executable builder). This PR
adds:
- A custom test builder that logs arguments and forwards to rustc
- A test verifying that `--test-builder` successfully invokes the custom
builder with rustc-style arguments
- Improved comments explaining both the error and success test scenarios

The test validates that custom builders can properly intercept and handle
doctest compilation.

Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
@jieyouxu
Copy link
Member

jieyouxu commented Nov 7, 2025

r? rustdoc

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Nov 7, 2025
@rustbot rustbot assigned GuillaumeGomez and unassigned jieyouxu Nov 7, 2025
@GuillaumeGomez
Copy link
Member

Much appreciated, thanks!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Nov 7, 2025

📌 Commit 8075c98 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 7, 2025
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 7, 2025
…llaumeGomez

Add test for --test-builder success path

Fixes rust-lang#148586
bors added a commit that referenced this pull request Nov 7, 2025
Rollup of 5 pull requests

Successful merges:

 - #145656 (Stabilize s390x `vector` target feature and `is_s390x_feature_detected!` macro)
 - #148204 (Modify contributor email entries in .mailmap)
 - #148556 (Fix suggestion for returning async closures)
 - #148585 ([rustdoc] Replace `print` methods with functions to improve code readability)
 - #148608 (Add test for --test-builder success path)

r? `@ghost`
`@rustbot` modify labels: rollup
let builder_bin = path("builder-bin");
rustc().input("builder.rs").output(&builder_bin).run();

let log_path = path("builder.log");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why removing this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m doing that intentionally, so each test run starts with no builder.log. The custom builder writes the log using fs::write(&log_path, ...), which creates the file fresh with only the arguments from the current run. If we left an old log in place, we might inadvertently read stale content from a previous run.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see, my bad.

@GuillaumeGomez
Copy link
Member

Failed in #148642.

I think it should only be run on linux.

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 7, 2025
@osamakader
Copy link
Contributor Author

I'm trying right now to use bare_rustc so we compile for the host architecture even in cross build.

Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[rustdoc] Missing test for --test-builder option

6 participants